//统一管理项目中用户相关的信息
import request from '@/utils/request'
import type { loginForm, loginResponseData, userResponseData } from './type'
//统一管理接口
enum API {
  USER_LOGIN_URL = '/user/login',
  USER_INFO_URL = '/user/info',
}
// 暴露请求函数
// 登录请求接口
export const reqUserLogin = (data: loginForm) =>
  request.post<any, loginResponseData>(API.USER_LOGIN_URL, data)
//获取用户信息接口方法
export const reqUserInfo = () =>
  request.get<any, userResponseData>(API.USER_INFO_URL)
